@namespace SwashbucklerDiary.Rcl.Pages
@inherits ImportantComponentBase

<MCard Class="my-list-card"
       Elevation="0"
       Rounded="@("lg")">
    <MList>
        @foreach (var item in DynamicLists)
        {
            <MListItem @key="item" OnClick="item.OnClick">
                <MListItemIcon>
                    <MIcon Class="evident-icon">
                        @item.Icon
                    </MIcon>
                </MListItemIcon>
                <MListItemContent>
                    <MListItemTitle>
                        @(I18n.T(item.Text))
                    </MListItemTitle>
                </MListItemContent>
                <MListItemAction>
                    <MIcon>chevron_right</MIcon>
                </MListItemAction>
            </MListItem>

            if (DynamicLists.Last() != item)
            {
                <MDivider Class="mx-5"></MDivider>
            }
        }
    </MList>
</MCard>

<MCard Class="my-list-card"
       Elevation="0"
       Rounded="@("lg")">
    <MListItem OnClick="()=>ShowConfig=true">
        <MListItemIcon>
            <MIcon Class="evident-icon">
                mdi:mdi-cog-transfer-outline
            </MIcon>
        </MListItemIcon>
        <MListItemContent>
            <MListItemTitle>
                @(I18n.T("Setting"))
            </MListItemTitle>
        </MListItemContent>
        <MListItemAction>
            <MIcon>chevron_right</MIcon>
        </MListItemAction>
    </MListItem>
</MCard>

<LANConfigDialog @bind-Visible="ShowConfig"
                 Form="configModel"
                 OnOK="SaveConfig"
                 OnReset="Reset">
</LANConfigDialog>
